package rest.jbpm.wrappers.refs;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;

@XmlType(name="variable")
public class VariableRef {
	
	private static String base;
	private String taskId;
	private String name;

	protected VariableRef() {
		
	}

	public VariableRef(String taskId, String name, String baseUri) {
		
		this.taskId = taskId;
		this.base = baseUri;
		this.name = name;
	}
	
	@XmlAttribute(name="name", required=true)
	String getName() {
		return name;
	}
	
	@XmlAttribute(name="ref", required=true)
	public String getValue() {
		return base + "tasks/" + taskId + "/variable/" + name;
	}


}
